package com.mofeng.myshop.domain.po;

import com.baomidou.mybatisplus.annotation.*;
import com.mofeng.myshop.domain.po.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用户基础信息
 * </p>
 *
 * @author MoFeng
 * @since 2024-04-16
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tb_user_base")
@Schema(name = "UserBase对象", description = "用户基础信息")
public class UserBase extends BaseEntity {

    @Schema(description = "密码")
    private String password;

    @Schema(description = "邮箱")
    private String email;

    @Schema(description = "电话")
    private String phone;

    @Schema(description = "权限ID")
    private Long powerId;

    @Schema(description = "角色ID/会员等级ID")
    private Long roleId;

    @Schema(description = "头像")
    private String image;

    @Schema(description = "状态 0 正常 2 禁用 1 注销")
    private String state;

    @TableField(exist = false)
    private UserPower power = new UserPower();
    @TableField(exist = false)
    private UserInfo info = new UserInfo();
    @TableField(exist = false)
    private UserRole role = new UserRole();
}
